import axios from 'axios'

const instance = axios.create({
    // timeout: 5000
});

// 发送前拦截
instance.interceptors.request.use(config => {
    return config;
}, error => {
    return Promise.reject(error);
});


// 对返回结果
instance.interceptors.response.use(result => {
    return result.data;
}, error => {
    return Promise.reject(error);
});

export default instance